package com.ruoyi.asset.workman.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.workman.domain.Workman;
import com.ruoyi.asset.workman.domain.bo.WorkmanSearchBo;
import com.ruoyi.asset.workman.domain.vo.WorkmanVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 作业人员导入明细Mapper接口
 *
 * @author cc
 * @date 2023-08-29
 */
public interface WorkmanMapper extends BaseMapperPlus<WorkmanMapper, Workman, WorkmanVo> {

    /**
     * 查询作业人员
     */
    Page<WorkmanVo> selectWorkmanPage(IPage<WorkmanVo> page, @Param("searchBo") WorkmanSearchBo searchBo);


    List<WorkmanVo> exportWorkman(@Param("searchBo") WorkmanSearchBo searchBo);

    /**
     * 查询作业人员
     */
    List statisticsWorkmanByServiceType(@Param("serviceType") String serviceType);

    /**
     * 统计指定服务类型的作业人员
     * @param serviceType
     * @param status
     * @return
     */
    int selectCountByServiceType(@Param("serviceType") String serviceType, @Param("status") String status);

    int selectCommunityCount(@Param("serviceType") String serviceType,@Param("status") String status
                            ,@Param("community") String community);

    int selectCommunityByDateCount(@Param("serviceType") String serviceType,@Param("status") String status
        ,@Param("community") String community,@Param("date") String date);
}
